package
{
	import c_extends.pie_upload;
	
	import controls.pjf_sendMenu;
	
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.system.Security;
	
	import mailru.MailruCall;
	
	public class c_extends extends Sprite {
		public static var _app: Object;
		private var _extendsLayer: Object;
		public function c_extends() {
			Security.allowDomain('*');
			super();
		}
		
		private function mailruReadyHandler(e: Event=null): void {
			new pjf_sendMenu(_app, _extendsLayer);
		}
			
		public function init(a_app: Object, extendsLayer: Object): void {
			_app = a_app;
			_extendsLayer = extendsLayer;
			new pie_upload(a_app, _extendsLayer);
			if (_app.mailruCallActive)  mailruReadyHandler();
			else  MailruCall.addEventListener(Event.COMPLETE, mailruReadyHandler);
		}
	}
}